package com.platform.mobile.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.platform.mobile.bean.GetNoticeResponse;
import com.platform.mobile.dao.MainPageDao;
import com.platform.mobile.entity.VisitNotice;
import com.platform.mobile.service.MainPageService;

@Service
public class MainPageServiceImpl implements MainPageService{

	@Autowired
	private MainPageDao dao;
	
	@Override
	public GetNoticeResponse getVisitNoticeByOrgId(String org_id) {
		
		VisitNotice vn = null;
		vn = dao.getNoticeByOrgId(org_id);
		
		GetNoticeResponse response = new GetNoticeResponse();
		
		if(vn != null){
			response.setContent(vn.getContent());
			response.setCreate_time(vn.getCreate_time());
		}
		
		return response;
	}

}
